﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SkymateServiceBase.cs" company="Skymate">
//   Copyright © 2015 Skymate. All rights reserved.
// </copyright>
// <summary>
//   定义SkymateServiceBase类型.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Skymate.Services
{
    using Skymate.Engines;

    /// <summary>
    /// skymate 服务基类.
    /// </summary>
    public abstract class SkymateServiceBase : ServiceBase, ISkymateServiceBase
    {
        #region Fields

        /// <summary>
        /// The work context.
        /// </summary>
        private IWorkContext workContext;

        #endregion

        #region Properties

        /// <summary>
        /// Gets the work context.
        /// </summary>
        public IWorkContext WorkContext
        {
            get
            {
                return this.workContext ?? (this.workContext = EngineContext.Current.Resolve<IWorkContext>());
            }
        }

        #endregion
    }
}
